package org.tity.test.java.lang;

import java.math.BigDecimal;

import org.tity.commons.lang.DataParser;

public class NumberA {
	
	public static void main(String[] args) {
        System.out.println("科学计数法数字");
        double num1 = 50123.12E5;
        System.out.println(num1);
        System.out.println(DataParser.parseString(num1));
        BigDecimal bd1 = new BigDecimal(num1);
        System.out.println(bd1.toPlainString());
        System.out.println(bd1.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
        System.out.println("普通数字");
        double num2 = 50123.12;
        System.out.println(num2);
        System.out.println(DataParser.parseString(num2));
        BigDecimal bd2 = new BigDecimal(num2);
        System.out.println(bd2.toPlainString());
        System.out.println(bd2.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
    }
	
	
	
 
}
